package com.mrd.gtimp.base.entity;

import org.hibernate.annotations.GenericGenerator;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * <p> application name: gtimp <p> copyright: Copyright@2012 明睿达科技有限公司
 */

/**
 * @author qiul
 */
@Entity(name = "T_SYS_COM_ITF")
@org.hibernate.annotations.Entity(dynamicInsert = true, dynamicUpdate = true)
public class SystemCopInterface implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "paymentableGenerator")
    @GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
    @Column(name = "ID")
    private String id;

    @ManyToOne
    @JoinColumn(name = "c_id", updatable = false)
    private Company company;

    @ManyToOne
    @JoinColumn(name = "i_id", updatable = false)
    private SystemInterface systemInterface;

    @Column(name = "i_type")
    private String type;

    @Column(name = "del_state")
    private String state = "0";

    @Column(name = "use_state")
    private String use_state = "0";

    @Column(name = "CREATOR", insertable = true, updatable = false)
    private String creator;

    @Column(name = "CTIME", insertable = true, updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date ctime;

    @Column(name = "MODIFIER", insertable = false, updatable = true)
    private String modifier;

    @Column(name = "MTIME", insertable = false, updatable = true)
    @Temporal(TemporalType.TIMESTAMP)
    private Date mtime;

    /*
     * 访问链接
     */
    @Column(name = "URL")
    private String URL;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }

    public SystemInterface getSystemInterface() {
        return systemInterface;
    }

    public void setSystemInterface(SystemInterface systemInterface) {
        this.systemInterface = systemInterface;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getUse_state() {
        return use_state;
    }

    public void setUse_state(String use_state) {
        this.use_state = use_state;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public Date getCtime() {
        return ctime;
    }

    public void setCtime(Date ctime) {
        this.ctime = ctime;
    }

    public String getModifier() {
        return modifier;
    }

    public void setModifier(String modifier) {
        this.modifier = modifier;
    }

    public Date getMtime() {
        return mtime;
    }

    public void setMtime(Date mtime) {
        this.mtime = mtime;
    }

    @Override
    public String toString() {
        return "SystemCopInterface [id=" + id + ", company=" + company + ", systemInterface="
                + systemInterface + ", type=" + type + "]";
    }

    public String getURL() {
        return URL;
    }

    public void setURL(String uRL) {
        URL = uRL;
    }
}
